﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.DAO;
using Com.CMS263.PO;

namespace Com.CMS263.BLL
{
    public class SendEmailBLL : BaseBLL<SendEmail>
    {
        SendEmailDAO dao = new SendEmailDAO();
        public SendEmail entity = new SendEmail();
        public override SendEmail GetModel()
        {
            return entity;
        }
        /// <summary>
        /// 按日期倒序分页查询提问
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<SendEmail> GetListByPage(int page, int pagesize,string email)
        {
            return dao.GetListByPage(page, pagesize,email);
        }
        /// <summary>
        /// 留言总条数
        /// </summary>
        /// <returns></returns>
        public int GetCount(string email)
        {
            return dao.GetCount(email);
        }
        /// <summary>
        /// 判断是否存在 true为存在,false为不存在
        /// </summary>
        /// <param name="email"></param>
        /// <returns></returns>
        public bool IsExists(string email)
        {
            return dao.IsExists(email);
        }
        public IList<SendEmail> GetAll()
        {
            return dao.GetAll();
        }
        public bool InsertSendEmail(SendEmail email)
        {
            return dao.InsertSendEmail(email);
        }
    }
}
